// @ts-ignore
/* eslint-disable */
import request from "@/libs/request";

/** getCurrentUser GET /api/mrs/current */
export async function getCurrentUserUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseMrsUser>("/api/mrs/current", {
    method: "GET",
    ...(options || {}),
  });
}

/** deleteUser POST /api/mrs/delete */
export async function deleteUserUsingPost(
  body: API.UserDeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponselong>("/api/mrs/delete", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getUserList GET /api/mrs/get */
export async function getUserListUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListMrsUser>("/api/mrs/get", {
    method: "GET",
    ...(options || {}),
  });
}

/** getHostsList GET /api/mrs/hosts */
export async function getHostsListUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListMap>("/api/mrs/hosts", {
    method: "GET",
    ...(options || {}),
  });
}

/** getUserKeytab GET /api/mrs/keytab */
export async function getUserKeytabUsingGet(options?: { [key: string]: any }) {
  return request<any>("/api/mrs/keytab", {
    method: "GET",
    ...(options || {}),
  });
}

/** userLogin POST /api/mrs/login */
export async function userLoginUsingPost(
  body: API.UserLoginRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseMrsUser>("/api/mrs/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** userLogout POST /api/mrs/logout */
export async function userLogoutUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseint>("/api/mrs/logout", {
    method: "POST",
    ...(options || {}),
  });
}

/** registerUser POST /api/mrs/register */
export async function registerUserUsingPost(
  body: API.UserRegisterRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponselong>("/api/mrs/register", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** updateUser POST /api/mrs/update */
export async function updateUserUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateUserUsingPOSTParams,
  body: API.UserUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponselong>("/api/mrs/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}
